Example 3 - Create and Save Under a New File Name

 

Summary:

This program starts Milestones Professional, creates a new file, adds a symbol on task row 1, and then saves the file under file name: "Test File From VBA.MLJ"

 

Public Sub Example3()

Set objMilestones = CreateObject ("Milestones")

With objMilestones

    .Activate

    .AddSymbol 1, "11/12/2023", 2

    nFileHandleVariant = 0

    nFileHandleVariant = .Save("c:\myfiles\"+ "Test File From VBG.MLP")

    nFileHandleInt = nFileHandleVariant

    If (nFileHandleInt = 0) Then

        MsgBox "File Save Failed"

    End If

    .Refresh

    .Close

End With

Exit sub

end sub

 

 

 

  Notes:

 

visit our programmer's page for more examples

 

 

Related Topics

  1. Example 1 - Create, Print, Save a File
  2. Example 2 - Opening and Printing an Existing File
  3. Save

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

To effectively program with this interface, it's important to learn all about Milestones Professional.  Learn about Milestones.

Milestones Professional 2023 Automation Methods and Properties.  © Copyright 2000-2023, KIDASA Software, Inc. All rights reserved.